<?php
/**
 * 众筹模块定义
 *
 * Created by PhpStorm.
 * User: VJLau
 * Date: 2018/1/30
 * Time: 下午3:12
 */

defined('IN_IA') or exit('Access Denied');

class Vj_bontripModule extends WeModule
{
    public function settingsDisplay($settings)
    {
        global $_GPC, $_W;

        if (checksubmit()) {
            $cfg = array(
                //公众号
                'isproduction' => $_GPC['isproduction'],
                'line_thumbs' => $_GPC['line_thumbs'],
                //客服
                'service_name' => $_GPC['service_name'],
                'service_mobile' => $_GPC['service_mobile'],
                'service_avatar' => $_GPC['service_avatar'],
                'qr_code_img' => $_GPC['qr_code_img'],
                // 关于我们
                'aboutus' => htmlspecialchars_decode($_GPC['aboutus']),
                // 短信宝设置
                'duanxinbao_uid' => $_GPC['duanxinbao_uid'],
                'duanxinbao_pwd' => $_GPC['duanxinbao_pwd'],
                'duanxinbao_content' => $_GPC['duanxinbao_content'],
                // 分享设置
                'share_title' => $_GPC['share_title'],
                'share_img' => $_GPC['share_img'],
                'share_description' => $_GPC['share_description'],
            );
            if ($this->saveSettings($cfg)) {
                message('保存成功', 'refresh');
            }
        }
        load()->func('tpl');
        include $this->template('setting');
    }
}